package com.gaoxinfu.demo.spring.cloud.jpa.customize.entity;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDate;

@Data
@Entity
@Table(name = "emp")
@Accessors(chain = true)
public class Emp implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @Id
    @ApiModelProperty("主键")
    @Column(name = "id", nullable = false)
    private Long id;

    /**
     * 员工号
     */
    @Column(name = "empno")
    @ApiModelProperty("员工号")
    private Integer empno;

    /**
     * 员工姓名
     */
    @Column(name = "ename")
    @ApiModelProperty("员工姓名")
    private String ename;

    /**
     * 岗位
     */
    @Column(name = "job")
    @ApiModelProperty("岗位")
    private String job;

    /**
     * 上级领导(员工号)
     */
    @Column(name = "mgr")
    @ApiModelProperty("上级领导(员工号)")
    private Integer mgr;

    /**
     * 入职日期
     */
    @ApiModelProperty("入职日期")
    @Column(name = "hiredate")
    private LocalDate hiredate;

    /**
     * 基本收入
     */
    @Column(name = "sal")
    @ApiModelProperty("基本收入")
    private BigDecimal sal;

    /**
     * 奖金
     */
    @Column(name = "comm")
    @ApiModelProperty("奖金")
    private BigDecimal comm;

    /**
     * 部门编号
     */
    @Column(name = "deptno")
    @ApiModelProperty("部门编号")
    private Integer deptno;

}
